package com.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.demo.beans.ResultBean;
import com.demo.myexception.AopException;
import com.demo.service.AopService;

@RestController
public class ResultBeanController {

	@Autowired
	private AopService aopService;

	@RequestMapping("/aop/{id}")
	public ResultBean<Boolean> testAop(@PathVariable("id") int id) throws AopException {

		return new ResultBean<Boolean>(aopService.test(id));

	}

}
